using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using Entities;
using System.Configuration;
namespace DAL
{
    public class tbTacGiaDAL
    {
        private SqlConnection cn = null;
        public tbTacGiaDAL()
        {
            cn = new SqlConnection(ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString);
            cn.Open();
        }
        public void Insert(tbTacGia  tacgia)
        {
            SqlCommand cm = new SqlCommand("sp_tbTacGia_Insert", cn);
            cm.CommandType = System.Data.CommandType.StoredProcedure;
            cm.Parameters.AddWithValue("@Ten", tacgia .Ten );
            cm.Parameters.AddWithValue("@DiaChi", tacgia .DiaChi );
            cm.Parameters.AddWithValue("@DienThoai", tacgia.DienThoai );
            cm.ExecuteNonQuery();
        }
        public void Update(tbTacGia tacgia)
        {
            SqlCommand  cm = new SqlCommand("sp_tbTacGia_Update", cn);
            cm.CommandType = System.Data.CommandType.StoredProcedure;
            cm.Parameters .AddWithValue (
            
        }

    }
}
